package com.example.web;

import com.example.model.Student;
import com.example.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SixthController {

    @Autowired
    private StudentService studentService;

    @RequestMapping("/student")
    public @ResponseBody Student selectStudent(Student student){
       Student temp= studentService.selectOne(student.getId());
        return temp;
    }
}
